#include <iostream>

using std::cout;
using std::endl;

void print()
{
    cout << "hello" << endl;
}
void test()
{
    int a = 10;
    //只是相当于定义了一个函数，但是并没有调用它
    auto f = [&a](int value){
        cout << "value = " << value << endl;
        ++a;
        cout << "a = " << a << endl;
    };

    cout << "-----------" << endl;
    f(100);

    /* print(); */
}

int main(int argc, char *argv[])
{
    test();
    return 0;
}

